-- 基础信息
local base_info = {
	group_id = 220133087
}

-- DEFS_MISCS
local defs = 
{
 lines=
        {
                [87014] = 87013,
                [87007] = 87020,
        },
	--玩法完成时 这个gadget如果为GearStop则会被设为Default
        	finish_gadget = 87008,
	--起点格configid
	starter = 87005,
	--终点格configid
	ender = 87017,
	--矩阵 用于踩格子时判断是否相邻
matrix = 
	{
		{       0,       0,       0,       0,87031,87030,87029,87028,87027,},
		{87009,87004,87002,87017,87021,87007,       0,       0,87026,},

		{87003,87010,       0,87018,87015,87016,       0,87024,87025,},

		{       0,       0,       0,87014,87001,87022,       0,       0,       0,},

		{       0,       0,       0,       0,87005,       0,       0,       0,       0,},

	},		
	
	--每个还原格控制哪些离散格
	reveal_tiles=
	{
		[87004] = {87006},
		[87027] = {87019,87032,87033,87034},


	},
	--离散格拼入哪个位置，拼入位置需要布设普通格，初始状态为903
	reveal_match=
	{
		[87006] = 87002,
		[87019] = 87028,
		[87032] = 87029,
		[87033] = 87030,
		[87034] = 87031,

	}
,
       	        --移动格的目标位置和使用的点阵
        movable_pos = 
        {--[移动格子configID] = new_pos: 两位数字的矩阵坐标，x是十位，y是个位
 [87014] = { new_pos = 42 }, 
 [87007] = { new_pos = 28 }, 
        }
,
}

--================================================================
-- 
-- 配置
-- 
--================================================================

-- 怪物
monsters = {
}

-- NPC
npcs = {
}

-- 装置
gadgets = {
	[87001] = { config_id = 87001, gadget_id = 70360350, pos = { x = 5048.784, y = 536.237, z = -1728.651 }, rot = { x = 358.890, y = 94.027, z = 347.338 }, level = 1 },
	-- 隐藏态
	[87002] = { config_id = 87002, gadget_id = 70360356, pos = { x = 5043.258, y = 537.463, z = -1722.461 }, rot = { x = 9.734, y = 88.659, z = 346.420 }, level = 1, state = GadgetState.Action03 },
	[87003] = { config_id = 87003, gadget_id = 70360350, pos = { x = 5037.186, y = 537.028, z = -1725.281 }, rot = { x = 358.890, y = 94.027, z = 343.835 }, level = 1 },
	[87004] = { config_id = 87004, gadget_id = 70360352, pos = { x = 5040.358, y = 537.803, z = -1722.596 }, rot = { x = 358.890, y = 94.027, z = 347.739 }, level = 1 },
	[87005] = { config_id = 87005, gadget_id = 70360354, pos = { x = 5048.602, y = 536.120, z = -1731.719 }, rot = { x = 359.270, y = 91.246, z = 7.791 }, level = 1 },
	[87006] = { config_id = 87006, gadget_id = 70360353, pos = { x = 5044.855, y = 539.339, z = -1719.932 }, rot = { x = 337.267, y = 100.866, z = 275.182 }, level = 1 },
	-- 移动平台移动B
	[87007] = { config_id = 87007, gadget_id = 70360351, pos = { x = 5052.212, y = 537.307, z = -1723.005 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1, route_id = 14, start_route = false },
	[87008] = { config_id = 87008, gadget_id = 70310171, pos = { x = 5048.825, y = 532.303, z = -1716.088 }, rot = { x = 349.319, y = 186.799, z = 356.418 }, level = 1, state = GadgetState.GearStop, persistent = true, interact_id = 64 },
	[87009] = { config_id = 87009, gadget_id = 70360350, pos = { x = 5037.373, y = 537.773, z = -1722.447 }, rot = { x = 358.890, y = 94.027, z = 344.877 }, level = 1 },
	[87010] = { config_id = 87010, gadget_id = 70360350, pos = { x = 5040.177, y = 537.086, z = -1725.490 }, rot = { x = 358.890, y = 94.027, z = 343.835 }, level = 1 },
	[87013] = { config_id = 87013, gadget_id = 70310349, pos = { x = 5045.353, y = 536.312, z = -1728.544 }, rot = { x = 1.091, y = 275.129, z = 0.974 }, level = 1 },
	-- 移动平台移动A
	[87014] = { config_id = 87014, gadget_id = 70360351, pos = { x = 5045.793, y = 536.179, z = -1728.439 }, rot = { x = 358.890, y = 94.027, z = 347.338 }, level = 1, route_id = 13, start_route = false },
	[87015] = { config_id = 87015, gadget_id = 70360350, pos = { x = 5049.047, y = 536.663, z = -1725.710 }, rot = { x = 358.890, y = 94.027, z = 350.689 }, level = 1 },
	[87016] = { config_id = 87016, gadget_id = 70360350, pos = { x = 5052.010, y = 536.720, z = -1725.918 }, rot = { x = 358.890, y = 94.027, z = 350.689 }, level = 1 },
	[87017] = { config_id = 87017, gadget_id = 70360355, pos = { x = 5046.257, y = 537.169, z = -1722.667 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1 },
	[87018] = { config_id = 87018, gadget_id = 70360350, pos = { x = 5046.077, y = 536.604, z = -1725.500 }, rot = { x = 358.890, y = 94.027, z = 350.689 }, level = 1 },
	[87019] = { config_id = 87019, gadget_id = 70360353, pos = { x = 5049.822, y = 540.969, z = -1718.962 }, rot = { x = 349.309, y = 117.598, z = 336.539 }, level = 1 },
	[87020] = { config_id = 87020, gadget_id = 70310349, pos = { x = 5052.286, y = 537.611, z = -1723.256 }, rot = { x = 358.890, y = 94.027, z = 359.046 }, level = 1 },
	[87021] = { config_id = 87021, gadget_id = 70360350, pos = { x = 5049.223, y = 537.249, z = -1722.795 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1 },
	[87022] = { config_id = 87022, gadget_id = 70360350, pos = { x = 5051.782, y = 536.295, z = -1728.860 }, rot = { x = 358.890, y = 94.027, z = 347.338 }, level = 1 },
	[87024] = { config_id = 87024, gadget_id = 70360350, pos = { x = 5058.627, y = 536.671, z = -1726.340 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1 },
	[87025] = { config_id = 87025, gadget_id = 70360350, pos = { x = 5061.671, y = 536.730, z = -1726.554 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1 },
	[87026] = { config_id = 87026, gadget_id = 70360350, pos = { x = 5061.860, y = 537.500, z = -1723.659 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1 },
	[87027] = { config_id = 87027, gadget_id = 70360352, pos = { x = 5062.046, y = 538.262, z = -1720.799 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1 },
	[87028] = { config_id = 87028, gadget_id = 70360356, pos = { x = 5059.090, y = 538.200, z = -1720.606 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1, state = GadgetState.Action03 },
	[87029] = { config_id = 87029, gadget_id = 70360356, pos = { x = 5055.986, y = 538.147, z = -1720.360 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1, state = GadgetState.Action03 },
	[87030] = { config_id = 87030, gadget_id = 70360356, pos = { x = 5052.962, y = 538.096, z = -1720.118 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1, state = GadgetState.Action03 },
	[87031] = { config_id = 87031, gadget_id = 70360356, pos = { x = 5049.896, y = 538.052, z = -1719.845 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1, state = GadgetState.Action03 },
	[87032] = { config_id = 87032, gadget_id = 70360353, pos = { x = 5052.202, y = 542.905, z = -1720.252 }, rot = { x = 349.309, y = 117.598, z = 336.539 }, level = 1 },
	[87033] = { config_id = 87033, gadget_id = 70360353, pos = { x = 5054.632, y = 540.690, z = -1720.260 }, rot = { x = 349.309, y = 117.598, z = 336.539 }, level = 1 },
	[87034] = { config_id = 87034, gadget_id = 70360353, pos = { x = 5057.436, y = 542.160, z = -1718.852 }, rot = { x = 349.309, y = 117.598, z = 336.539 }, level = 1 }
}

-- 区域
regions = {
	-- 玩法限定区域
	[87023] = { config_id = 87023, shape = RegionShape.SPHERE, radius = 18, pos = { x = 5047.948, y = 536.729, z = -1725.914 } }
}

-- 触发器
triggers = {
}

-- 变量
variables = {
}

-- 废弃数据
garbages = {
	gadgets = {
		{ config_id = 87011, gadget_id = 70360351, pos = { x = 5039.962, y = 536.401, z = -1728.391 }, rot = { x = 358.890, y = 94.027, z = 347.338 }, level = 1 },
		{ config_id = 87012, gadget_id = 70360351, pos = { x = 5058.815, y = 537.435, z = -1723.469 }, rot = { x = 358.890, y = 94.027, z = 345.120 }, level = 1 }
	}
}

--================================================================
-- 
-- 初始化配置
-- 
--================================================================

-- 初始化时创建
init_config = {
	suite = 1,
	end_suite = 0,
	rand_suite = false
}

--================================================================
-- 
-- 小组配置
-- 
--================================================================

suites = {
	{
		-- suite_id = 1,
		-- description = ,
		monsters = { },
		gadgets = { 87008 },
		regions = { },
		triggers = { },
		rand_weight = 100
	},
	{
		-- suite_id = 2,
		-- description = ,
		monsters = { },
		gadgets = { 87001, 87002, 87003, 87004, 87005, 87006, 87007, 87009, 87010, 87013, 87014, 87015, 87016, 87017, 87018, 87019, 87020, 87021, 87022, 87024, 87025, 87026, 87027, 87028, 87029, 87030, 87031, 87032, 87033, 87034 },
		regions = { 87023 },
		triggers = { },
		rand_weight = 100
	}
}

--================================================================
-- 
-- 触发器
-- 
--================================================================

require "V2_8/DrawOneLine_Dreamland"